package com.maiji.cloud.service;

import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.entities.login.Label;
import com.maiji.cloud.entities.login.Recipe;
import com.maiji.cloud.request.ReqMetaData;
import com.maiji.cloud.request.login.RecipeReqData;
import com.maiji.cloud.request.login.RecipeFindAllReqData;
import com.maiji.cloud.response.BaseDataResDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.BaseResDto;
import com.maiji.cloud.response.login.RecipeResData;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;

public interface RecipeService extends IService<Recipe> {

    public static final String REDISNAMESPACE = "recipe";

    BaseMetaResDto<List<RecipeResData>> findAllRecommendRecipes(String token, ReqMetaData metaData);

    BaseMetaResDto<List<RecipeResData>> findAllRecipes(RecipeFindAllReqData data, String token, ReqMetaData reqMetaData);

    BaseMetaResDto<List<RecipeResData>> findAllRecipeByLogin(String token, ReqMetaData reqMetaData);

    BaseDataResDto<String> uploadRecipes(MultipartFile uploadFile) throws Exception;

    BaseResDto delRecipesByIds(List<String> data);

    BaseResDto addRecipe(RecipeReqData data) throws Exception;

    BaseResDto editRecipe(RecipeReqData data) throws Exception;

    BaseDataResDto<RecipeResData> findRecipeById(String recipeId, String token);

    BaseDataResDto<List<Label>> findAllLabelsByRecipeId(String recipeId);

    BaseMetaResDto<List<RecipeResData>> findAllRecipesByFoodId(String token, String foodId, ReqMetaData reqMetaData);

    BaseResDto addOrCancelRecommend(String recipeId);

}
